{% extends "layout.html" %}
{% block body %}
<div class="container-fluid">
  <div class="row">
    <div class="col-lg-12">
      <h3 class="page-header">用户列表</h3>
    </div>
  </div>

  <div class="row">
    <div class="col-lg-12">
      {% for message in get_flashed_messages() %}
        <p class="alert alert-success">{{ message }}</p>
      {% endfor %}
      <div class="table-responsive">
        <table class="table table-hover">
          <thead>
          <tr>
            <th>id</th>
            <th>username</th>
            <th>password</th>
            <th>createDate</th>
            <th>编辑</th>
          </tr>
          </thead>
          <tbody>
            {% for user in users %}
              <tr>
                <td>{{user.id}}</td>
                <td>{{user.username}}</td>
                <td>{{user.password}}</td>
                <td>{{user.create_date}}</td>
                <td>
                  <a href="/user/{{user.id}}">
                    详情
                  </a>
                  <a href="/user/delete/{{user.id}}">
                    删除
                  </a>
                </td>
              </tr>
            {% endfor%}
          </tbody>
        </table>
      </div>
    </div>
  </div>
</div>
{% endblock %}
